#include <iostream>

class Test  //内存对齐
{
public:
    Test():a(1),b(2){}
    virtual void show()
    {
        std::cout<<"hello"<<std::endl;
    }
public:
    int a;
    char b;
    // const int c;
    // static int d;
};

class Derived : virtual public Test
{

public:
    int* c;
};

//int Test::d = 0;

int main()
{
    //Test t;
    //printf("%p %p %p %p\n",&t,&t.a,&t.b,&t.c);
    //std::cout<<t.c<<std::endl;
    //int *p = (int *)&t.c;
    // *p = 20;
    // std::cout<<t.c<<std::endl;
    //std::cout<<sizeof(Test)<<std::endl;


    Derived t;
    printf("%p %p %p %p\n",&t,&t.a,&t.b,&t.c);
    std::cout<<sizeof(t)<<std::endl;
    return 0;
}